from pydantic import BaseModel
from typing import Optional

from .. import schemas

class class_return(BaseModel):
    code: int
    message: str
    class_: Optional[schemas.Classes]

class classes_return(BaseModel):
    code: int
    message: str
    classes_: list[schemas.Classes]

class user_return(BaseModel):
    # code为0表示找到/创建用户,1表示找不到，2表示没有权限
    code: int
    message: str
    user: Optional[schemas.Users]

class users_return(BaseModel):
    code: int
    message: str
    users: list[schemas.Users]

class user_class_return(BaseModel):
    code: int
    message: str
    user_class: Optional[schemas.User_Class]
